package com.service.impl;

import com.bean.Repair;
import com.dao.impl.RepairDAOImpl;
import com.service.RepairService;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public class RepairServiceImpl implements RepairService {

    RepairDAOImpl repairDAO = new RepairDAOImpl();
    @Override
    public List<Repair> selectAll() throws SQLException {
        return repairDAO.selectAll();
    }
    @Override
    public List<Repair>  selectByName(String ownerId) throws SQLException {
        return repairDAO.selectByName(ownerId);
    }
    @Override
    public boolean deleteById(Integer id) throws SQLException {
        return repairDAO.deleteById(id);
    }
    @Override
    public boolean removeAll(String[] idsArr) throws SQLException {
        return repairDAO.deleteAll(idsArr);
    }
    @Override
    public boolean insert(Repair r) throws SQLException {
        return repairDAO.insert(r);
    }
    @Override
    public boolean update(Repair r) throws SQLException {
        return repairDAO.update(r);
    }
    @Override
    public Integer count() throws SQLException {
        return repairDAO.count();
    }

    @Override
    public Integer countSearch(Map map) throws SQLException {
        return repairDAO.countSearch(map);
    }

    @Override
    public List<Repair> selectAllPagination(Integer offset, Integer limit) throws SQLException {
        return repairDAO.selectAllPagination(offset,limit);
    }


    @Override
    public List<Repair> selectAllPaginationSearch(Integer offset, Integer limit, Map map) throws SQLException {
        return repairDAO.selectAllPaginationSearch(offset,limit,map);
    }

}